package com.yhp.service.iml;

import com.yhp.bean.Student;
import com.yhp.dao.StudentDao;
import com.yhp.dao.iml.StudentDaoImpl;
import com.yhp.service.StudentService;

import java.util.List;

public class StudentServiceImpl implements StudentService {
    private StudentDao studentDao = new StudentDaoImpl();

    @Override
    public List<Student> getStudent(String stuname, String stuno, int sex, int pageIndex, int pageSize) {
        return studentDao.getStudent(stuname, stuno, sex, pageIndex, pageSize);
    }

    @Override
    public int total(String stuname, String stuno, int sex) {
        return studentDao.total(stuname, stuno, sex);
    }

    @Override
    public int insert(Student student) {
        return studentDao.insert(student);
    }

    @Override
    public Student findById(int stuId) {
        return studentDao.findById(stuId);
    }

    @Override
    public int updateStudent(Student student) {
        return studentDao.updateStudent(student);
    }

    @Override
    public int delStudent(String stuId) {
        return studentDao.delStudent(stuId);
    }

    @Override
    public Student checkByStuNo(String StuNo) {
        return studentDao.checkByStuNo(StuNo);
    }
}
